﻿using ColorApplication.Constants;

namespace ColorApplication.Helper
{
    public static class Converter
    {
        public static AnalysisOption ConvertAnalysisOpt(object o)
        {
            AnalysisOption result;
            var intVal = SQLHelper.GetIntValue(o);
            switch (intVal)
            {
                case 1:
                    result = AnalysisOption.OnePicture;
                    break;
                case 2:
                    result = AnalysisOption.TwoPicture;
                    break;
                default:
                    result = AnalysisOption.ViaUrl;
                    break;
            }
            return result;
        }
    }
}